﻿Public Class frmDiem

    Private Sub ThêmToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ThêmToolStripMenuItem.Click
        Dim frm As frmNhapDiem_HocSinh = New frmNhapDiem_HocSinh
        frm.ShowDialog()
    End Sub

    Private Sub XóaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles XóaToolStripMenuItem.Click
        Dim dr As DialogResult = New DialogResult
        dr = MessageBox.Show("Bạn thật sự muốn xóa?", "Delete!", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2)

        If dr = Windows.Forms.DialogResult.Yes Then
            'xóa
        End If

    End Sub

    Private Sub SửaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SửaToolStripMenuItem.Click
        Try

            If dtgDiem.CurrentRow.Cells("MaHS").Value <> "" Then
                Dim frm As frmNhapDiem_HocSinh = New frmNhapDiem_HocSinh
                frm.ShowDialog()
            Else
                MessageBox.Show("Bạn chưa chọn giá trị.")
            End If

        Catch ex As Exception
            MessageBox.Show("Bạn chưa chọn giá trị.")
        End Try

    End Sub
End Class